﻿#pragma once

#include "LOGIN.h"
#include "afxdialogex.h"
#include "resource2.h"
#include "../../DIO/DIO.h"
#include "../../DIO/DIO.cpp"
#include"../../../QuantyView3DView.h"
extern User_ST user;




class LOGIN : public CDialogEx
{
	DECLARE_DYNAMIC(LOGIN)

public:
	LOGIN(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~LOGIN();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_LOGIN };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()

private:
	// 用户名
	CString name;

private:
	// 密码
	CString password;
public:
	virtual void OnOK();
	afx_msg void OnClose();

public://与主界面交流
	void setUserAddr(User_ST* u, bool* isL)
	{
		user = u;
		isLogin = isL;
	}
protected:
	User_ST* user;
	bool *isLogin;
	CQuantyView3DView* view;
public:
	afx_msg void OnEnChangeName();
	afx_msg void OnBnClickedLogin();
	afx_msg void OnBnClickedLoginLogin();
	afx_msg void OnBnClickedLoginRegister();
	void setView(CQuantyView3DView* view__)
	{
		view = view__;
	}
};
